<?php

class Encode
{
	public static function getHtml($type, $val)
	{
		if($type == "json")
		{
			return utf8_encode($val);
		}

		return htmlspecialchars($val);

	}
	
	public static function getEncode($type, $val)
	{
		if($type == "json")
		{
			return json_encode($val);
		}
		
		return $val;
	}
}

?>
